<template>
  <view class="my-container">
    <!-- 登录组件 -->
    <my-login v-if="!token"></my-login>
    <!-- 用户信息组件 -->
    <my-userinfo v-else></my-userinfo>
  </view>
</template>

<script>
import { mapGetters, mapState } from 'vuex';
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState({
      token: state => state.userInfo.token
    })
  }
};
</script>

<style lang="scss">
page,
.my-container {
  height: 100%;
}
</style>
